home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
os2
/
ticker2.zip
/
scripts
/
quote.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-05-22
|
836b
|
42 lines
/* script to randomly display a quote */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
/* call addTicker 'debug1', DEBUG1, -3, black */
maxquotes = 999
arg filename
if (filename = '') then
filename = 'scripts\quote.txt'
/* if you now how many quotes are in the file, than change
the following line to quotenr = random(NROFQUOTES) */
quotenr = random(maxquotes)
quotefound = 0
quoteline = ''
do while lines(filename)
aline = linein(filename)
if (quotefound = quotenr) then
quoteline = quoteline' 'aline
if (aline = '') then
quotefound = quotefound + 1
if (\ (lines(filename))) then
do
if (quotefound < maxquotes) then
aline = linein(filename,1,0)
end
end
call addTicker ' 'quoteline' ', 'QUOTE', 0, yellow
exit